#include <pthread.h>
#include <stdio.h>
#define NUM_THREADS     5

void *PrintHello(void *threadid);

void *PrintHello(void *threadid)
{
	printf("Hello World! It's me, thread # %d!\n", (int)threadid);
	//return threadid;
}

int main (int argc, char *argv[])
{
   	pthread_t threads[NUM_THREADS];

   	for(int t = 0; t < NUM_THREADS; t++)
	{
		printf("In main(): creating thread %d \n",t);
	   	int rc = pthread_create(&threads[t], NULL, PrintHello, (void *)t);
   	}

   	/* Last thing that main() should do */
   	pthread_exit(NULL);
}

// void* => can be cast to any data type
